package com.dyh.quickdemozwei.lstThera;

import com.alibaba.fastjson.JSON;
import com.dyh.quickdemozwei.util.HttpClientCustom;
import com.dyh.quickdemozwei.util.HttpClientWrap;
import com.google.common.collect.Lists;
import org.junit.jupiter.api.Test;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Consumer;

public class TestLstThrea {


    public static void main(String[] args) {

        ExecutorService executorService =
                Executors.newFixedThreadPool(3);

        Runnable nanimoshinai = ()->{};

        executorService.submit(nanimoshinai);
        executorService.submit(nanimoshinai);
        executorService.submit(nanimoshinai);



        Object o = null;
        String str = JSON.toJSONString(o) ;

        System.out.println();

    }

    class ListSplitWorkUnit{

        List data;
        Consumer consumer;
        int coreNum;


        public ListSplitWorkUnit(int coreNum) {
            this.coreNum = coreNum;
        }

        public  <T>  void apply(List<T> data, Consumer<T> consumer){
            this.data = data;
            this.consumer = consumer;
        }


        class WorkThread extends Thread{


            @Override
            public void run() {

            }
        }
    }


    @Test
    public void test(){
        List<Integer> list = Lists.newArrayList(1,2,3,4,5,6,7);


    }
}
